﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YXQ.Dao.ViewModel;
using YXQ.Service;

namespace YXQ.Manager.Manager
{
    public partial class Project : BaseAdminPage
    {
        public ProjectModel pmdl = new ProjectModel();
        public int tpid = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["tpid"] != null) {
                tpid = Convert.ToInt32(Request["tpid"]);
            }

            if (!IsPostBack) {
                GetData();
            }
        }

        private void GetData()
        {
            pmdl = CenterService.projectService.GetOneById(reqID);
            if (pmdl != null) {
                txtProjectName.Value = pmdl.ProjectName;
                txtEndTime.Value =pmdl.EndTime.HasValue? pmdl.EndTime.Value.ToString("yyyy-MM-dd"):"";
                txtStartTime.Value =pmdl.StartTime.HasValue? pmdl.StartTime.Value.ToString("yyyy-MM-dd"):"";
            }
        }
    }
}